from memedb import db, Meme, load_or_create_in_db
from get_image import get_image
from get_info import get_info

import config


import logging
import sys
logging.debug('Running scrapper…')

# Get image or desc or linked image or all 3
# if(len(sys.argv) > 1):


for fbid in config.ndt_fbid_file.readlines():
    fbid = fbid.rstrip()
    meme = load_or_create_in_db(fbid)

    get_image(meme)
    get_info(meme)

# input("Press Enter to continue...")
print("Finished!")
